package dto

import "time"

// UserMessage 映射数据库表 l_user_message
type UserMessage struct {
	ID int64 `gorm:"column:id;primaryKey;autoIncrement;not null;comment:'主键'" json:"id"`

	UserID string `gorm:"column:user_id;type:varchar(255);not null;index;comment:'用户ID'" json:"userId"`

	MessageID int64 `gorm:"column:message_id;not null;index;comment:'消息ID'" json:"messageId"`

	ReadStatus int `gorm:"column:read_status;type:tinyint(1);default:0;comment:'0=未读，1=已读'" json:"readStatus"`

	Deleted int `gorm:"column:deleted;type:tinyint(1);default:0;comment:'0=正常，1=删除'" json:"deleted"`

	ReceiveTime time.Time `gorm:"column:receive_time;type:datetime;not null;comment:'接收时间'" json:"receiveTime"`

	AcceptID string `gorm:"column:accept_id;type:varchar(255);comment:'接受用户ID'" json:"acceptId"`
}

func (UserMessage) TableName() string {
	return "l_user_message"
}
